package com.zbkj.crmeb.user.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户关系记录表
 * +----------------------------------------------------------------------
 * | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
 * +----------------------------------------------------------------------
 * | Author: CRMEB Team <admin@crmeb.com>
 * +----------------------------------------------------------------------
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("eb_user_rel_record")
@ApiModel(value = "User对象", description = "用户关联记录表")
public class UserRelRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 推广用户id，顶级为0
     */
    private Integer parentId;

    /**
     * 是否生效0-否 1-是
     */
    private Integer effectFlag;

    /**
     * 关联时间
     */
    private Date relTime;

    /**
     * 用户成为行者的时间
     */
    private Date xzTime;

    /**
     * 用户成为辅导师的时间
     */
    private Date fdsTime;

    /**
     * 用户成为健康信使时间
     */
    private Date jkxsTime;

    /**
     * 上月复购情况，状态0或1，每月第一天定时任务自动将thisMonthShopping字段更新到该字段，并将thisMonthShopping置为0
     */
    private Integer lastMonthShopping;

    /**
     * 本月复购情况，状态0或1
     */
    private Integer thisMonthShopping;

    /**
     * 关系创建时间
     */
    private Date createTime;


}
